package com.jusyl.cristo.spider.smzdm;

import us.codecraft.webmagic.Site;
import us.codecraft.webmagic.model.OOSpider;
import us.codecraft.webmagic.model.annotation.ExtractBy;
import us.codecraft.webmagic.model.annotation.TargetUrl;

@TargetUrl("https://search.smzdm.com/?c=home&s=%E5%B0%8F%E7%B1%B3&order=time&v=b")
public class SmzdmModel {
	
	@ExtractBy("//ul[@class='subcate-tab-list']/html()")
	private String test;
	
	public String getTest() {
		return test;
	}


	public void setTest(String test) {
		this.test = test;
	}


	@Override
	public String toString() {
		return "SmzdmModel [test=" + test + "]";
	}




	public static void main(String[]  args) {
		
		System.out.println("开始");
		OOSpider.create(Site.me().setSleepTime(1000), new SmzdmModelPipeline(), 
						SmzdmModel.class).addUrl("https://search.smzdm.com/?c=home&s=%E5%B0%8F%E7%B1%B3&order=time&v=b").run();
		System.out.println("结束");
	}
}
